package com.ruoyi.erp.domain.bo;

import com.ruoyi.common.annotation.query.EQ;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 期间业务对象 sys_period
 *
 * @author chenyun
 * @date 2022-03-13
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("期间业务对象")
public class SysPeriodBo extends BaseEntity {

    /**
     * 编号
     */
    @EQ
    @ApiModelProperty(value = "编号", required = true)
    @NotNull(message = "编号不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 机构
     */
    @EQ
    @ApiModelProperty(value = "机构", required = true)
    @NotNull(message = "机构不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long orgId;

    /**
     * 年
     */
    @EQ
    @ApiModelProperty(value = "年", required = true)
    @NotNull(message = "年不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer year;

    /**
     * 期间
     */
    @EQ
    @ApiModelProperty(value = "期间", required = true)
    @NotNull(message = "期间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer period;

    /**
     * 起始时间
     */
    @EQ
    @ApiModelProperty(value = "起始时间", required = true)
    @NotNull(message = "起始时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date startTime;

    /**
     * 结束时间
     */
    @EQ
    @ApiModelProperty(value = "结束时间", required = true)
    @NotNull(message = "结束时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date endTime;

    /**
     * 备注信息
     */
    @EQ
    @ApiModelProperty(value = "备注信息", required = true)
    @NotBlank(message = "备注信息不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;


}
